import Vue from 'vue'
import SvgIcon from '@/components/svg-icon'// svg component

// register globally
Vue.component('svg-icon', SvgIcon)
let req
if (process.env.VUE_APP_NAME === 'i18n') {
  req = require.context('./i18n-svg', false, /\.svg$/)
} else {
  req = require.context('./zh-svg', false, /\.svg$/)
}
const baseSvg = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(baseSvg)
requireAll(req)
